.todo-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
}

.todo-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    margin-bottom: 12px;
    border: 1px solid #fff;
    border-left: 1px solid #8b5cf6;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}


/* 悬停效果 */
.todo-list li:hover {
    border-left: 4px solid #8b5cf6;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

/* 完成状态特效 */
.todo-list li.done {
    border-left-color: #10b981;
    background: rgba(248, 250, 252, 0);
    animation: none;
}


.todo-list li.done span {
    text-decoration: line-through;
    color: #94a3b8;
    transition: all 0.5s ease;
}

/* 复选框动画 */
.todo-list input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #c4b5fd;
    /* 淡紫色边框 */
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all 0.3s ease;
}

.todo-list input[type="checkbox"]:checked {
    background-color: #8b5cf6;
    /* 紫色背景 */
    border-color: #8b5cf6;
}

.todo-list input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: checkPop 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 文本输入框 - 强化紫色调 */
input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #c4b5fd;
    /* 淡紫色边框 */
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #faf5ff, #f3e8ff);
    /* 紫色调渐变背景 */
    color: #4c1d95;
    /* 深紫色文本 */
    box-shadow: inset 0 1px 2px rgba(139, 92, 246, 0.08);
}

/* 输入框 placeholder 颜色 */
input[type="text"]::placeholder {
    color: #a78bfa;
    /* 紫色提示文字 */
    opacity: 0.7;
}

/* 输入框聚焦状态颜色 */
input[type="text"]:focus {
    outline: none;
    border-color: #8b5cf6;
    /* 深紫色边框 */
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2),
        inset 0 1px 2px rgba(139, 92, 246, 0.05);
    color: #4c1d95;
    /* 更深的紫色文本 */
}

/* 输入框禁用状态颜色 */
input[type="text"]:disabled {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #a78bfa;
    cursor: not-allowed;
}

/* 按钮样式与特效 */
button {
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 9px 16px;
}

/* 添加按钮 - 紫色调 */
button.add {
    background: #8b5cf6;
    color: white;
}

button.add:hover {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* 删除按钮 - 移动到最右边 */
button.del {
    background: #fef2f2;
    color: #ef4444;
    padding: 6px 12px;
    margin-left: auto;
    /* 关键: 将删除按钮推到最右侧 */
}

button.del:hover {
    background: #fee2e2;
    transform: translateX(2px);
}

/* 任务添加动画 */
.todo-list li.new-task {
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* 任务删除动画 */
.todo-list li.remove-task {
    animation: fadeAway 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 动画关键帧 */
@keyframes checkPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.3);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes softComplete {
    0% {
        background: white;
    }

    50% {
        background: #f0fdf4;
    }

    100% {
        background: #f8fafc;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeAway {
    0% {
        opacity: 1;
        transform: translateX(0);
        height: auto;
    }

    50% {
        opacity: 0.5;
        transform: translateX(10px);
    }

    100% {
        opacity: 0;
        transform: translateX(30px);
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}